import store from "../../store";
const NewThematicActivities = () => import("../../containers/NewThematicActivities/index.vue");
export default (routerArray = []) => {
    let template = store.getters["gw/getSpecialTemplate"]
    console.log('templatetemplate',template);
    let isEdit = window.environment === "edit";
    if (Object.keys(template).length) {
        template.config.pages.forEach(item => {
            let obj = {
                path: item.path,
                name: item.path,
                title: item.title,
                state: item.state
            }
            let components = {}
            if (item.type==='buyGiftCard') {
                components = {
                    real: () => import("../../edit-containers/GiftBuyDec"),
                    style: () => import("../../edit-containers/GiftBuyDec/style.vue"),
                    edit: () => import("../../edit-containers/GiftBuyDec/edit.vue")
                }
            } else if (item.type==='IntegralBuy'){
                components = {
                    real: () => import("../../edit-containers/PointMallDec"),
                    style: () => import("../../edit-containers/PointMallDec/style.vue"),
                    edit: () => import("../../edit-containers/PointMallDec/edit.vue")
                }
            } else {
                components = {
                    real: () => import("../../edit-containers/Activities2"),
                    style: () => import("../../edit-containers/Activities2/style.vue"),
                    edit: () => import("../../edit-containers/Activities2/edit.vue")
                }
            }
            isEdit ? (obj.components = components) : (obj.components = {real: NewThematicActivities});
            routerArray.push(obj);
        });
    }
    console.log('routerArray',routerArray)
    return routerArray;
}